import { NestFactory } from "@nestjs/core";
import { AppModule } from "./app.module";
import session from "express-session";
async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.use(
    session({
      secret: "keyboard cat",
      resave: false, // 不重新保存
      saveUninitialized: false, // 不保存未初始化的会话
      cookie: { maxAge: 60000 },
    })
  );
  await app.listen(3000);
}

bootstrap();
